package com.jic.market.enums;

/**
 * @author yinhaijun
 * @date: 2020/4/14
 */
public enum DiscountAmountServiceOperateEnum {

    SHOPPING_CART_QUERY(1, "购物车查询"),
    COUPON_QUERY(2, "优惠劵查询"),
    SETTLEMENT_QUERY(3, "结算页查询"),
    CREATE(4, "创建"),
    PAY(5, "支付"),
    REFUND(5, "退款");


    private Integer code;
    private String message;

    DiscountAmountServiceOperateEnum(Integer code, String message) {
        this.code = code;
        this.message = message;
    }

    public static DiscountAmountServiceOperateEnum getByCode(Integer code){
        DiscountAmountServiceOperateEnum[] values = DiscountAmountServiceOperateEnum.values();
        for(DiscountAmountServiceOperateEnum value : values){
            if(value.getCode().equals(code)){
                return value;
            }
        }
        return null;
    }

    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

}
